/**
 * bootstrap table plugins
 */
(function() {
	'use strick',
	require.config({
		paths: {
			"bootstrap.table": "bootstrap/extends/bootstrap-table/1.9.1/js/bootstrap-table.min",
			"bootstrap.table.zh-CN": "bootstrap/extends/bootstrap-table/1.9.1/js/locale/bootstrap-table-zh-CN.min",
			"bootstrap.table.mobile": "bootstrap/extends/bootstrap-table/1.9.1/js/extensions/mobile/bootstrap-table-mobile.min"
		},
		shim: {
			"bootstrap.table": {
				deps : [
				   "jquery", 
				   "css!bootstrap/extends/bootstrap-table/1.9.1/css/bootstrap-table.min.css"
				],
				exports:"jQuery.fn.bootstrapTable"
			},
			"bootstrap.table.zh-CN": {deps : ["bootstrap.table"]},
			"bootstrap.table.mobile": {deps : ["bootstrap.table"]}
		}
	});
	
	define(['bootstrap.table','bootstrap.table.zh-CN','bootstrap.table.mobile'], function(){
		return function(){
			jQuery(".bootstrap-table").bootstrapTable({
				onLoadSuccess:function(data){
					jQuery("[data-toggle='tooltip']").tooltip({html:true, container:"html", trigger:'hover'});
					if(this.eventOnload) window[this.eventOnload](data);
				}
			});
		};
	});
})(this);
